<template>
  <el-select v-model="name" placeholder="请选择用户" filterable>
    <el-option v-for="item in data" :key="item.id" :label="item.nickName" :value="item.id" />
  </el-select>
</template>

<script setup lang="ts">
import { computed, onMounted } from "vue";
const { proxy } = getCurrentInstance();
let props = defineProps(["modelValue", "readonly", "val", "dict"]);
const emit = defineEmits(["update:modelValue", "fatherMethods"]);
let data = ref([]);

onMounted(() => {
  getInfo();
});
const name = computed({
  get() {
    return props.modelValue;
  },
  set(value: Number) {
    emit("update:modelValue", value);
  },
});

let getInfo = async (nickName) => {
  data.value = await proxy.$apis.appUserAll({
    nickName,
  });
};
</script>

<style lang="scss" scoped>
</style>
